-- UNITDEF -- pawnlong_ii --
--------------------------------------------------------------------------------

local unitName = "pawnlong_ii"

--------------------------------------------------------------------------------

local unitDef = 
{
  acceleration       = 2,
  brakeRate          = 2,
  buildCostMetal     = 10,
  canAttack          = true,
  canhover 		     = true,
  canMove            = true,
  canstop            = 1,
  category           = [[PAWN UNARMORED UNIT TARGET]],
  collisionvolumetest = 1,
  corpse              = [[DEAD]],
  description        = [[Artillery Lv 2]],
  energyMake         = 0,
  energyStorage      = 0,
  explodeAs          = [[Death]],
  footprintX         = 2,
  footprintZ         = 2,
  iconType           = [[grunt]],
  idleAutoHeal       = 10,
  idleTime           = 300,
  levelGround        = false,
  maxDamage          = 180,
  maxVelocity        = 4,
  metalMake          = 0,
  metalStorage       = 0,
  movementClass      = [[HOVER]],
  name               = [[Adv Hankyu Missile Hovercraft]],
  noChaseCategory    = [[NOTARGET AIR]],
  objectName         = [[pawnlong_i.s3o]],
  radarDistance      = 0,
  reclaimable        = false,
  seismicSignature   = 1,
  selfDestructAs     = [[Death]],
  selfDestructCountdown = 1,
  showNanoFrame      = false,
  sightDistance      = 800,
  smoothAnim         = false,
  turnRate           = 600,
  unitname           = [[pawnlong_ii]],
  upright            = true,
  waterline           = 0,
  sfxtypes = 
	{
    explosiongenerators = {
	[[custom:missileshot]],
	[[custom:burning]],
					},
	},
  -- sounds = 
	-- {
		-- arrived = 
		-- {
			-- [[commandgiven]],
		-- },
		-- ok = 
		-- {
			-- [[commandgiven]],
		-- },
		-- select = 
		-- {
			-- [[select]],
		-- },
	-- },
  weapons = {
    [1]  = {
      def                = [[liiwep1]],
      onlyTargetCategory = [[TARGET]],
	  badtargetcategory  =  [[NOTARGET]],
    },
  },
}


--------------------------------------------------------------------------------

local weaponDefs = {
  liiwep1 = {
name = [[Small Missiles]], --need brackets or wont load unit
id                 = 2,
	rendertype = 1,
	lineofsight = 1,
	turret = 1,
	ballistic = 0,
	smoketrail = 1,
	smokedelay = .1,
	model = [[srocket.s3o]],
	collideFriendly     =  false,
	accuracy = 400,
	range = 1320, --110%
	wobble = 1000,
	reloadtime = 3,
	burst = 3,
	burstrate = 0.4,
	areaofeffect = 50,
	weapontimer = 5,
	weaponvelocity = 450,
	startvelocity = 250,
	weaponacceleration = 220,
	turnrate = 200, --counter wobble? was at 1000 but too accurate
	metalpershot = 0,
    energypershot = 0,	
	soundstart = [[Rocket]],
	soundhit = [[medexplo]],
	soundTrigger = 1,
	firestarter = 70,
	guidance = 1,
	tracks = 1,
	selfprop = 1,
	TrajectoryHeight = 0.5,
	tolerance = 1000,
	explosiongenerator = [[custom:MISSILE_EXPLOSION]],
	impulsefactor = 0,
	impulseBoost = 0,
	craterMult = 0,
	craterBoost = 0,
	startsmoke = 1,
	InterceptedByShieldType = 2,

    damage = {
      default            = 20,
    },
  },
  }
unitDef.weaponDefs = weaponDefs

local featureDefs = {
    DEAD  = {
      description      = [[Wreckage - pawn]],
      blocking         = true,
      category         = [[corpses]],
      damage           = 1000,
      energy           = 0,
	  featureDead      = [[HEAP]],
      featurereclamate = [[SMUDGE01]],
      footprintX       = 2,
      footprintZ       = 2,
      height           = [[20]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[pawnlong_i_dead.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      world            = [[All Worlds]],
    },
	
	 HEAP  = {
      description      = [[Debris - pawn]],
      blocking         = true,
      category         = [[heaps]],
      damage           = 500,
      energy           = 0,
      featurereclamate = [[SMUDGE01]],
      footprintX       = 2,
      footprintZ       = 2,
      height           = [[4]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[car_heap.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      seqnamereclamate = [[TREE1RECLAMATE]],
      world            = [[All Worlds]],
    },
  }
  unitDef.featureDefs = featureDefs
  
--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
